<script type="text/javascript" src="scripts/ubb.js"></script>
<script type="text/javascript" src="scripts/editor.js"></script>

$ScriptBlock$
<form id="EditForm" name="EditForm" method="POST" onsubmit="return checksubmit();"  enctype="multipart/form-data">
<input type="hidden" name="Mode" value="$Mode$" />
<input type="hidden" name="BoardId" value="$BoardId$" />
<input type="hidden" name="TopicId" value="$TopicId$" />
<input type="hidden" name="Username" value="$Username$" />
<input type="hidden" name="UID" value="$UID$" />
<input type="hidden" name="AttachIds" value="$AttachIds$" />
<input type="hidden" name="VoteIds" value="$VoteIds$" />
<input type="hidden" name="IconId" value="$IconId$" />
<input type="hidden" name="EffectMinutes" value="$EffectMinutes$" />
<input type="hidden" name="TopicStatus" value="$TopicStatus$" />
<input type="hidden" name="Locked" value="$Locked$" />
<input type="hidden" name="Token" value="$Token$" />
$controls/tableheader(
Caption=Caption,
ElementId="editor"
)$
<table cellspacing="0" class="inner">
<tr class="category forumtd" style="$if(ReplyMode)$display:none;$endif$">
<td class="postLeft">主题类型</td>
<td class="postRight an"><input type="radio" name="radiobutton" value="radiobutton" class="smallbox" id="radiobutton1" checked="checked" onClick="changetopictype(1)"/><label for="radiobutton1">&nbsp;<img src="{IMGDIR}/button/normal.gif" alt="">&nbsp;普通主题</label>&nbsp;<input type="radio" name="radiobutton" disabled="disabled" value="radiobutton" class="smallbox" id="radiobutton3" /><label for="radiobutton3">&nbsp;<img src="{IMGDIR}/button/dealing.gif" alt="">&nbsp;交易主题</label>&nbsp;<input type="radio" name="radiobutton" disabled="disabled" value="radiobutton" class="smallbox" id="radiobutton4" /><label for="radiobutton4">&nbsp;<img src="{IMGDIR}/button/question.gif" alt="">&nbsp;问答主题</label></td>
</tr>
$if(ShowSubjectRow)$
<tr class="forumtd">
<td>专题：</td>
<td class="an"><input type="radio" id="subjectid0" name="SubjectId" value="0" class="smallbox" checked="checked" />
<label for="noneicon" class="small">None</label>
&nbsp; &nbsp;
$Subjects:{s|
<input type="radio" id="SubjectId$s.Id$" name="SubjectId" value="$s.Id$" class="smallbox" />
$s.SubjectName$ &nbsp; &nbsp;
}$</td>
</tr>
$endif$
$if(ShowTitleRow)$
<tr class="forumtd" style="$if(ReplyMode)$display:none;$endif$">
<td>标题：</td>
<td class="an"><input id="Title" maxlength="50" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" style="width:50%;" name="Title" value="$Title$" />&nbsp;(标题长度不超过 50 个字符)</td>
</tr>
$endif$
$if(ShowEmotionRow)$
<tr class="forumtd">
<td class="postLeft postEm">
<span class="left">表情：</span><span class="right"><a href="###" onClick="createemotion(1, 20)">1</a><a href="###" onClick="createemotion(21, 16)">2</a><a href="###"  onclick="createemotion(37, 16)">3</a><a href="###"  onclick="createemotion(54, 16)">4</a><a href="###" onClick="createemotion(70, 16)">5</a></span></td>
<td class="postRight"><span id="emotion"></span></td>
</tr>
$endif$
<tr class="forumtd">
<td class="postLeft" valign="top">
<p>正文内容&nbsp;<span style="color:#F00">*</span></p>
<p>&nbsp;</p>
<p><input id="urloff" type="checkbox" value="1" name="urloff" class="smallbox" />禁用 URL 识别</p>
<p><input id="emotionoff" type="checkbox" value="2" name="emotionoff" class="smallbox" />禁用表情符号</p>
<p><input id="ubboff" type="checkbox" value="4" name="ubboff" class="smallbox" />禁用 UBB</p>
<p>&nbsp;</p>
<p>限制字节：<span class="small">
<script>
if (EditorMode.indexOf('Topic') > -1)
document.write(TopicContentSize);
else
document.write(ReplyContentSize);
</script>
</span>个字符</p>
<p>剩余字节：<span class="small t1" id="leftcontentsize"></span></p>
<p>&nbsp;</p>
<p>允许上传附件
<script>if(AllowUpload) document.write("√"); else document.write("×");</script>
</p>
<p>允许发布图片
<script>if(AllowImage) document.write("√"); else document.write("×");</script>
</p>
<p>允许发布Flash
<script>if(AllowFlash) document.write("√"); else document.write("×");</script>
</p>
<p>允许发布视频
<script>if(AllowMedia) document.write("√"); else document.write("×");</script>
</p>
<p>允许发布代码
<script>if(AllowCode) document.write("√"); else document.write("×");</script>
</p>
<p>&nbsp;</p>
<p class="partition"></p>
<p class="an"><input type="checkbox" class="smallbox" name="fans" id="fans" value="8" id="checkbox" />
<label for="checkbox">仅FANS可见</label>
</p>
<p class="partition"></p>
<p class="an"><input type="checkbox" class="smallbox" name="friends" id="friends" value="16" id="checkbox" />
<label for="checkbox">仅好友可见</label>
</p>
<p class="partition"></p>
</td>
<td class="postRight" valign="top">
<div class="ubb_button">
$if(ShowToolbarRow)$ <span id="toolbar" class="an"></span> $endif$
<p class="partition"></p>
<div class="ubb_div">
<textarea id="editbox" name="editbox" onkeydown="return ctlent(event)" style="height:250px;display:none;">
$Content$
</textarea>
<iframe id="editwin" name="editwin" style="height:252px;" scrolling="auto" frameborder="0"></iframe>
</div>
<div style="clear:both; width:99%;">
<div class="left">&nbsp;&nbsp;&nbsp;<input type="button" name="ubbbtn" id="ubbbtn" value="UBB 模式" class="ubb_unselected" onClick="switchmode('ubb', this);" />
&nbsp;
<input type="button" name="designbtn" id="designbtn" value="所见即所得模式" class="ubb_selected" onClick="switchmode('design', this);" />
&nbsp;
<input type="button" name="htmlbtn" id="htmlbtn" value="Html 代码模式" class="ubb_unselected" onClick="switchmode('html', this);" /></div>
<div class="right"><img src="images/ubb/big.gif" onclick="resize(50);" alt="增">&nbsp;<img src="images/ubb/small.gif" onclick="resize(-50);" alt="减"></div>
</div>
<p class="partition"></p>
</div>
<div class="ubb_button an" style="padding:10px 0px; clear:both; width:100%;">
<a href="javascript:onuploadfile()"><img src="images/ubb/att.gif" alt="添加附件">添加附件</a>&nbsp;&nbsp;$if(ShowOptionRow)$&nbsp;&nbsp;&brvbar;&nbsp;&nbsp;<img src="{IMGDIR}/icon/require.gif" alt="浏览限制">&nbsp;浏览限制($Credits.Credit0.Name$):
<input name="Require" style="height:17px" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" size="5" value="$Require$" />
&nbsp;小于或等于<span class="small t1">
<script>document.write(LimitRequire);</script>
$Credits.Credit0.Unit$</span>&nbsp;&nbsp;<span class="t2">&brvbar;</span>&nbsp;&nbsp;<img src="{IMGDIR}/icon/price.gif" alt="主题售价">&nbsp;主题售价($Credits.Credit1.Name$):
<input name="Price" style="height:17px" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" size="5" value="$Price$" />
&nbsp;小于或等于<span class="small t1">
<script>document.write(LimitPrice);</script>
$Credits.Credit1.Unit$</span>&nbsp;&nbsp;<span class="t2">&brvbar;</span>&nbsp;&nbsp;$endif$</div>
<p class="partition"></p>
<div id="filecontainer"></div>
</td>
</tr>
<tr class="forumtd">
<td colspan="2">
<div class="comment">浏览限制：(会员$Credits.Credit0.Name$达到指定值才能浏览该主题)当前您可设置最高为&nbsp;<span class="small t1">
<script>document.write(LimitRequire);</script>
$Credits.Credit0.Unit$</span><br />
主题售价：(浏览该主题后，浏览者相应的$Credits.Credit1.Name$将转到作者的帐户上)当前您可设置最高为&nbsp;<span class="small t1">
<script>document.write(LimitPrice);</script>
$Credits.Credit1.Unit$</span><br />
附件信息：当前您可上传的附件类型为
<span class="small t1"><script>if(IsAdmin)document.write(SystemAttachType); else document.write(AttachType);</script></span>
，最大为<span class="small t1"><script>document.write(size(AllowAttachSize));</script></span>，今天可还可以上传<span class="small t1"><script>document.write(LeftCount);</script>次</span>，<span class="small t1"><script>document.write(size(LeftSize));</script></span></div></td>
</tr>
<tr class="forumtd">
<td colspan="2" align="center">
$if(ShowVerifier)$
验证码
<input type='text' name='verification' style='width:50px;' class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" />
<script language='javascript'> document.write("<img src='verifier.aspx?time=", new Date(), "' alt='验证码图片, 看不清字符请点击刷新, 如果是加法运算, 填入计算结果'   style='cursor:hand' onclick=\"this.src = this.src.substring(0, this.src.indexOf('time=')) + 'time=' + new Date()\"/>"); </script>
&nbsp;&nbsp;$endif$
<input type="submit" id="post" name="post" class="button" value="提 交&nbsp;(Ctrl + Enter)"/>
</td>
</tr>
</table><span id="votecontainer" style="display:none;"></span>
$controls/tablefooter()$
</form>
<script type="text/javascript">
createeditor();
$if(ShowSubjectRow)$
checkradiobyvalue(document.forms["EditForm"].SubjectId, '$SubjectId$');
$endif$
if (Tag != -1)
{
	document.forms["EditForm"].urloff.checked = ((Tag&1) != 0);
	document.forms["EditForm"].emotionoff.checked = ((Tag&2) != 0);
	document.forms["EditForm"].ubboff.checked = ((Tag&4) != 0);
	document.forms["EditForm"].fans.checked = ((Tag&8) != 0);
	document.forms["EditForm"].friends.checked = ((Tag&16) != 0);
}
</script>